@extends('admin.layout.index')

@section('css')
	<link rel="stylesheet" type="text/css" href="/mws/css/page_page.css" media="screen">
@endsection

@section('content')
	<div class="mws-panel grid_8 mws-collapsible">
    	<div class="mws-panel-header">
        	<span><i class="icon-table"></i> 客服列表</span>
        <div class="mws-collapse-button mws-inset"><span></span></div></div>
        <div class="mws-panel-inner-wrap">
        <div class="mws-panel-body no-padding">
            <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
            <div id="DataTables_Table_0_length" class="dataTables_length">
            <form action="/admin/call/list" method="get">
            <label>显示
            	<select size="1" name="count" aria-controls="DataTables_Table_0">
            		<option value="10" @if(!empty($request['count']) && $request['count'] == 10) selected @endif>10</option>
            		<option value="25" @if(!empty($request['count']) && $request['count'] == 25) selected @endif>25</option>
            		<option value="50" @if(!empty($request['count']) && $request['count'] == 50) selected @endif>50</option>
            		<option value="100" @if(!empty($request['count']) && $request['count'] == 100) selected @endif>100</option>
            	</select> 条</label>
            	
            </div>
            <div class="dataTables_filter" id="DataTables_Table_0_filter">
            	<label>关键字: <input aria-controls="DataTables_Table_0" name="search" type="text" value="{{ $request['search'] or '' }}"></label>
            	<input type="submit" value="搜索">
            </div>
            </form>
            <table class="mws-table mws-datatable dataTable" id="DataTables_Table_0" aria-describedby="DataTables_Table_0_info">
                <thead>
                    <tr role="row">
                    <th class="sorting_asc" style="width: 30px;">编号</th>
                    <th class="sorting" style="width: 205px;">客服昵称</th>
                    <th class="sorting" style="width: 191px;">客服QQ</th>
                    <th class="sorting" style="width: 129px;">客服电话</th>
                    <th class="sorting_asc" style="width: 121px;">邮箱</th>
                    <th class="sorting" style="width: 94px;">客服状态</th>
                    <th class="sorting_disabled" style="width: 148px;">操作</th>
                    </tr>
                </thead>
                
            	<tbody role="alert" aria-live="polite" aria-relevant="all">
					@foreach( $data as $k => $v)	
            			<tr class="odd">
                        <td class="  sorting_1">{{ $v['call_id'] }}</td>
                        <td class=" ">{{ $v['call_name'] }}</td>
                        <td class=" ">{{ $v['call_qq'] }}</td>
                        <td class=" ">{{ $v['call_phone'] }}</td>
                        <td class=" ">{{ $v['call_email'] }}</td>
                        <td class=" ">{{ $v['call_status'] }}</td>
                        <td class=" ">
                            <span class="btn-group">
                                <a href="/admin/call/edit/{{ $v['call_id'] }}" class="btn btn-small" style="margin-left:40px" title="修改"><i class="icon-pencil"></i></a>
                                <a href="/admin/call/delete/{{ $v['call_id'] }}" class="btn btn-small" title="删除"><i class="icon-trash"></i></a>
                            </span>
                        </td>
                    </tr>
                    @endforeach
                    </tbody>
                    </table>
                    <div class="dataTables_info" id="DataTables_Table_0_info">显示 1 到 10 的 10 条目</div>
                   	<div id="page_page">
                   		{!! $data-> appends($request) -> render() !!}
                   	</div>
                </div>
        </div></div>
    </div>
	

@endsection